#ifndef CHATWIDGET_H
#define CHATWIDGET_H

#include <QWidget>
#include <QDateTime>

#include "icysettings.h"

namespace Ui {
    class ChatWidget;
}

class ChatWidget : public QWidget {
    Q_OBJECT

    public:
        ChatWidget(QWidget *parent = 0, IcySettings *fSettings = 0,
                   const QString &sfSN = 0, const QString &sfAlias = 0);
        ~ChatWidget();

    protected:
        void changeEvent(QEvent *e);

    private:
        Ui::ChatWidget *ui;
        IcySettings *settings;
        QString *sSN, *sAlias;

        _fastcall void addEvent(const QString &sEvent);
        void sendMsg();

    signals:
        void onSendMsg(const QString &sSN, const QString &sMessage);


    private slots:
        void on_actionSend_triggered();
        void on_sendBtn_clicked();

    public slots:
        void onMsgReceived(const QString &sMessage);
        void onXStatusChanged(const QString &sHead, const QString &sText);
};

#endif // CHATWIDGET_H
